<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function fn () {
            var min = arguments[0] ; 
            var max = arguments[0] ;
            for (var i = 0 ; i < arguments.length ; i ++ ){
                if ( arguments[i] < min ){
                    min = arguments[i];
                } else {
                    max = arguments[i];
                }
            }
            for (var j = 0 ; j < arguments.length ; j ++ ){
                // console.log(arguments[j] > min);
                // console.log(arguments[j] < max);
                // console.log(arguments[j] > min && arguments[j] < max);
                if ( arguments[j] > min &&  arguments[j] < max ){
                    console.log("中间值"+arguments[j]);
                }
            }
            console.log("最小值为"+min);
            console.log("最大值为"+max);
        }
        fn(9,10,12,45,78,35,12,48);
    </script>
</body>
</html>